package flextestng.testing.model
{
	import flash.filesystem.File;
	import flash.utils.Dictionary;
	
	public class SuiteDefinition
	{
		public function SuiteDefinition(name:String, module:String)
		{
			_name = name;
			_module = module;
		}
		
		public function addParamter(key:String, value:String):void
		{
			_parameters[key] = value;
		}
		
		public function addTest(test:TestDefinition):Boolean
		{
			if (_tests.indexOf(test) == -1) {
				_tests.push(test);
				return true;
			}
			
			return false;
		}
		
		public function getParameter(key:String):String
		{
			return _parameters[key];
		}
		
		private var _module:String;
		public function get module():String
		{
			return _module;
		}
		
		public function get moduleFile():File
		{
			return new File(module);
		}
		
		private var _name:String;
		public function get name():String
		{
			return _name;
		}
		
		private var _parameters:Dictionary = new Dictionary();
		public function get parameters():Dictionary
		{
			return _parameters;
		}
		
		private var _tests:Array = [];
		public function get tests():Array
		{
			return _tests.slice();
		}
	}
}